package io.bdmc.modules.bss.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.bdmc.common.annotation.Excel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * fec盘数据 实体
 * </p>
 *
 * @author 黄露
 * @since 2021-04-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
// "DeviceMachineFec对象", description = "fec盘数据")
public class DeviceMachineFec extends Model<DeviceMachineFec> {

  private static final long serialVersionUID = 1L;

  // "fec数据")
  @TableId(value = "machine_fec_id", type = IdType.AUTO)
  private Integer machineFecId;

  private Boolean intervalSave;

  // "设备id")
  private Integer deviceId;

  @Excel(name = "单盘SN")
  private String diskSn;

  @Excel(name = "设备SN")
  @TableField(exist = false)
  private String deviceSn;
  
  // "工作模式")
  private String workMode;

  // "线路侧速率")
  private String speedCode;

  // "客户侧速率")
  private String speedCodeClient;

  // "FEC开启")
  private String states;

  // "FEC编码增益")
  private String codeGain;

  // "")
  private String bit0;

  // "")
  private String bit1;

  // "")
  private String bit2;

  // "")
  private String bit3;

  private String temp;
  private String fanLifeTime;
  private String fanRunTime;
  private String fanNo;
  private String fanState;
  private String fanSpeed;
  // "0:无自环，1,硬件自环状态，2芯片内部自环")
  private String loopStates;

  // "模块告警")
  private String alarm;

  // "客户端侧接受m1误码")
  @Excel(name = "客户端侧接受m1误码")
  private String rxM1NowError;

  // "客户端侧接受b1误码")
  @Excel(name = "客户端侧接受b1误码")
  private String rxB1NowError;

  // "客户端侧接受b2误码")
  @Excel(name = "客户端侧接受b2误码")
  private String rxB2NowError;

  // "客户端侧发送m1误码")
  @Excel(name = "客户端侧发送m1误码")
  private String txM1NowError;

  // "客户端侧发送b1误码")
  @Excel(name = "客户端侧发送b1误码")
  private String txB1NowError;

  // "客户端侧发送b2误码")
  @Excel(name = "客户端侧发送b2误码")
  private String txB2NowError;

  // "客户侧接收B1的误码秒")
  @Excel(name = "客户侧接收B1的误码秒")
  private String ushRxB1Es;
  // "客户侧接收B1的严重误码秒")
  @Excel(name = "客户侧接收B1的严重误码秒")
  private String ushRxB1Ses;
  // "客户侧发送B1的误码秒")
  @Excel(name = "客户侧发送B1的误码秒")
  private String ushTxB1Es;
  // "客户侧发送B1的严重误码秒")
  @Excel(name = "客户侧发送B1的严重误码秒")
  private String ushTxB1Ses;
  // "客户侧发送B1的不可用秒")
  @Excel(name = "客户侧发送B1的不可用秒")
  private String ushTxB1Uas;
  // "客户侧发送B1的可用秒")
  @Excel(name = "客户侧发送B1的可用秒")
  private String ushTxB1As;
  // "客户侧接收B1的可用秒")
  @Excel(name = "客户侧接收B1的可用秒")
  private String ushRxB1As;
  // "客户侧接收B1的不可用秒")
  @Excel(name = "客户侧接收B1的不可用秒")
  private String ushRxB1Uas;

  // "线路测 接收比特交叉就检验误码个数")
  @Excel(name = "接收比特交叉就检验误码个数")
  private String uiBip8ErrCnt;
  // "线路测 接收对端回传误码个数")
  @Excel(name = "线路测接收对端回传误码个数")
  private String uiBeiErrCnt;
  // "线路测 收FEC纠正1误码个数")
  @Excel(name = "线路测收FEC纠正1误码个数")
  private String ui1ErrCnt;
  // "线路测 收FEC纠正0误码个数")
  @Excel(name = "线路测收FEC纠正0误码个数")
  private String ui0ErrCnt;
  // "线路测 收FEC不能纠正误码个数")
  @Excel(name = "线路测收FEC不能纠正误码个数")
  private String uiUncrtBlockCnt;
  // "线路测 收FEC收到的总块数")
  @Excel(name = "线路测收FEC收到的总块数")
  private String uiRxBlocksCnt;
  // "线路测 纠错前误码率")
  @Excel(name = "线路测纠错前误码率")
  private String ufRxBer;
  // "线路测 纠错后误码率")
  @Excel(name = "线路测纠错后误码率")
  private String ubRxBer;

  // "创建时间")
  @Excel(name = "创建时间")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime createTime;

  @TableField(exist = false)
  private List<DeviceMachineFecModule> fecModuleList;

  @Override
  public Serializable pkVal() {
    return this.machineFecId;
  }

}
